The present disclosure relates to a communication device, a communication method, and a computer program product for a communication device that measure a bandwidth that can be used during communication.
In a case where a communication device transmits data through a network such as the Internet or the like, it is necessary for the communication device to transmit the data at a transmission rate that is suited to the capacity of the transmission channel that can be used. Hereinafter, the transmission channel capacity and the transmission rate will be called the bandwidth. The capacity of the transmission channel that can be used is called the usable bandwidth. The usable bandwidth varies according to circumstances such as the region, the provider, the time of day, and the like. It is therefore desirable for the communication device to select the bandwidth for transmitting data by matching the varying usable bandwidth.
A method for specifying the usable bandwidth is known. In this method, the communication device includes, in packets, time information for computing a packet transmission interval. The communication device successively transmits a plurality of packets while varying the bandwidth at the time of transmission by incrementally changing the transmission interval. Another communication device receives the packets and stores the packet receiving intervals. Thereafter, the differences between the stored receiving intervals and the transmission intervals that were computed based on the time information within the packets are computed. The usable bandwidth is specified based on a trend of changes in the computed plurality of differences.
The specifying of the usable bandwidth is performed for each one of a plurality of specified ranges of bandwidths. Hereinafter, the range of bandwidths is called the bandwidth range. The bandwidths that are used for transmitting the packets are selected from within the specified bandwidth range, starting with the widest bandwidth. The packets are transmitted in order using the selected bandwidth, and a determination is made as to whether a usable bandwidth exists within the specified bandwidth range. In a case where a usable bandwidth does not exist within the specified bandwidth range, the bandwidth range is extended. In a case where a usable bandwidth exists at a narrower bandwidth than the bandwidths within the specified bandwidth range, the bandwidth range is extended in the direction of the narrower bandwidths. In a case where a usable bandwidth exists at a wider bandwidth than the bandwidths within the specified bandwidth range, the bandwidth range is extended in the direction of the wider bandwidths. The determination as to whether a usable bandwidth exists within the extended bandwidth range is made repeatedly.